<template>
  <!--  时间线 -->
  <div class="block" id="timeline">
    <el-timeline class="timeline-content">
      <div class="timeline-wk">
        <div class="timeline-item" v-for="(item, index) in tableData">
          <div class="timeline-title">
            <span>{{ item.entryTime }}</span>
            <span class="timeline-type-icon">{{ item.source_app }}</span>
            <span class="timeline-type-icon">{{ item.source_app_type }}</span>
          </div>
          <div class="timeline-container">
            <div class="timeline-container-list">
              <span>{{ item.dev_info }}</span>
            </div>
          </div>
        </div>
      </div>
    </el-timeline>
  </div>
</template>

<script>
export default {
  name: 'timeLine',
  props: {
    tableData: {
      type: Array,
      default() {
        return []
      },
    },
    total: {
      type: Number,
      default() {
        return 0
      },
    },
  },
  data() {
    return {}
  },
  watch: {
    tableData: {
      handler(newVal) {},
      deep: true,
      immediate: true,
    },
  },
  mounted() {},
  methods: {
    getData() {
      this.$emit('handleScroll')
    },
  },
}
</script>

<style lang="scss" scoped>
.timeline-count {
  background: #f3f5fc;
  padding: 10px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.timeline-content {
  .timeline-wk {
    .timeline-item {
      .timeline-title {
        display: flex;
        align-items: center;
        padding: 14px 0;

        span {
          margin-left: 20px;

          &.timeline-type-icon {
            display: flex;
            align-items: center;
            color: #4b6eef;

            &::before {
              display: block;
              content: '';
              width: 5px;
              height: 5px;
              margin-right: 10px;
              border-radius: 50%;
              background: #d8d8d8;
            }
          }
        }

        &::before {
          display: block;
          content: '';
          width: 14px;
          height: 14px;
          border-radius: 50%;
          background: #4b6eef;
          border: 2px solid #dbe2fc;
        }
      }

      .timeline-container {
        border-left: 3px solid #4b6eef;
        background: #f5f7fe;
        padding: 20px;
        margin-left: 6px;
        display: flex;

        .timeline-container-list {
          width: 33%;

          span {
            display: block;
            line-height: 24px;
          }
        }
      }
    }
  }
}

::v-deep .el-timeline-item__timestamp {
  color: #303133;
  font-size: 14px;
}
</style>
